package com.apexedu.portal.controller;

import com.alibaba.fastjson.JSON;
import com.apexedu.biz.service.impl.BizTreeSupport;
import com.apexedu.portal.constant.ActionConstant;
import net.ysen.tree.entitybean.TreeNode;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.io.UnsupportedEncodingException;
import java.sql.SQLException;
import java.util.List;

/**
 * Created by liwang on 2017/7/3.
 */
@Controller
public class MhSzgdzyxxController  extends BaseController {

    @ResponseBody
    @RequestMapping(value = ActionConstant.SzGz.Menu_tree)
    public String getOneCardPassHistoricalLists(String appId, String upMenuId) {
        List<TreeNode> result = null;
        try {
            result = BizTreeSupport.queryTreeData(appId, upMenuId);
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return JSON.toJSONString(result);
    }
}
